package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.SysUserSalaryHistory;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SysUserSalaryHistoryMapper {
    /**
     * 插入传入月份的用户薪级信息
     *
     * @param payId
     * @param userId
     * @param nowDate
     * @return
     */
    public int insertUserSalaryHistoryByUserId(@Param("payId") Long payId, @Param("userId") Long userId, @Param("nowDate") Date nowDate);

    /**
     * 获取给定月份的所有用户薪级信息
     *
     * @param nowDate
     * @return
     */
    public List<SysUserSalaryHistory> getSalaryHistoryListByNowDate(String nowDate);

    /**
     * 获取给定月份的用户薪级信息
     *
     * @param userId
     * @param nowDate
     * @return
     */
    public SysUserSalaryHistory getSalaryHistoryByUserIdAndNowDate(@Param("userId") Long userId, @Param("nowDate") String nowDate);

    /**
     * 更新给定月份用户的薪级信息
     *
     * @param payId
     * @param userId
     * @param nowDate
     * @return
     */

    public int updateUserSalaryHistoryByUserId(@Param("payId") Long payId, @Param("userId") Long userId, @Param("nowDate") Date nowDate,@Param("nowDateStr") String nowDateStr);
}
